﻿@{
    Layout = null;
}

<h2>CheckEmpInfoState</h2>
<link href="~/Content/css/bootstrap.min.css" rel="stylesheet" />
<script src="~/Scripts/js/jquery.min.js"></script>
<script src="~/Scripts/js/bootstrap.min.js"></script>

<table class="table">
    <tr><td>员工ID：</td><td><b>@Model.EmployID</b></td></tr>
    <tr><td>性别：</td><td><b>@Model.Sex</b></td></tr>
    <tr><td>年龄：</td><td><b>@Model.Age</b></td></tr>
    <tr><td>学位：</td><td><b>@Model.Degree</b></td></tr>
    <tr><td>背景：</td><td><b>@Model.IndustryBack</b></td></tr>
    <tr><td>特长：</td><td><b>@Model.Specialty</b></td></tr>
    <tr><td>头像：</td><td><img src="@Model.EmployeePhoto" width="270" height="160" /></td></tr>
    <tr>
        <td>审核状态：</td>
        <td>
            <select id="InfoState" style="height:30px;">
                <option value="0">审核通过</option>
                <option value="1">待审核</option>
                <option value="2">审核驳回</option>
            </select>
        </td>
    </tr>
    <tr><td></td><td>
        <input type="button" value="提交" class="btn btn-success" style="padding-left:30px;padding-right:30px;margin-top:30px;" onclick="SubmitInfoState()" />
        <input type="button" value="返回" class="btn btn-danger" style="padding-left:30px;padding-right:30px;margin-left:30px;margin-top:30px;" onclick="BackIndex()" />
        </td></tr>
</table>

<script>
    var InfoState = '@Model.InfoState';
    $("#InfoState").val(InfoState);

    //提交审核消息
    function SubmitInfoState() {
        $.ajax({
            type: "post",
            url: "/Employee/SubmitInfoState",
            data: { InfoState: $("#InfoState").val(),EmpId:'@Model.EmployID' },
            success: function (obj) {
                if (obj > 0) {
                    location.href = '/Employee/ManageEmployee';
                }
            }
        })
    }

    //返回
    function BackIndex() {
        location.href = '/Employee/ManageEmployee';
    }
</script>